﻿
namespace Commons.Models.Settings.Matchers
{
	/// <summary>
	/// This class lets you build an object that contains a set of rules <see cref="Rule"/> to implement and evaluate an object
	/// to determine if they comply with those rules.
	/// </summary>
	/// <typeparam name="T"></typeparam>
	public interface IMatcher<T>
	{
		/// <summary>
		/// met
		/// </summary>
		/// <param name="currentValue">currentValue the value to evaluate</param>
		/// <returns>true if the object passed by parameter comply the rules</returns>
		bool Met(T currentValue);

		/// <summary>
		/// add a Rule
		/// </summary>
		/// <param name="rule">rule a new rule to add</param>
		void AddRule(IRule<T> rule);
	}
}
